Learn R Programming

Rfast (version 1.2)

Internal function for the Dirichlet distibution: Internal function for the Dirichlet distibution

Description

Internal function for the Dirichlet distibution.

Usage

diri_nr_type2(a1,a2,ma,tol)

Arguments

a1
A vector with initial values.
a2
A second vector with initial values.
ma
A vector with column-wise means of the logarithm of the compositional data.
tol
The tolerance level idicating no further increase in the log-likelihood.

Value

A column vector with the final parameters.

Details

This function is to be called by the diri.nr2 function. It is not to be called directly by the user unless you know what you are doing.

See Also

diri.nr2

Examples

Run this code
x <- matrix( rgamma(100 * 4, c(5, 6, 7, 8), 1), ncol = 4)
x <- x / rowSums(x)
system.time( for(i in 1:1000) diri.nr2(x) )

Run the code above in your browser using DataLab